<!DOCTYPE html>
<html>
    <head>
        <style>
            h1 { font-size: 24px; }
            td, div { font-size: 48px; }
        </style>
    </head>
    <body>
        <h1>
          The last two rows below should be identical.
        </h1>
        <table dir="rtl">
            <tr><th>isolated</th><th>initial</th><th>medial</th></tr>
            <tr><td>&#x0639;</td><td>&#xFECB;</td><td>&#xFECC;</td></tr>
            <tr><td>&#x0639;</td><td>&#x0639;&zwj;</td><td>&zwj;&#x0639;&zwj;</td></tr>
        </table>

        <h1>
          The two lines below should be identical.
        </h1>
        <div dir="rtl">&#x0639;&#x0639;&#x0639;</div>
        <div dir="rtl">&#x0639;&zwj;<span>&zwj;&#x0639;&zwj;</span>&zwj;&#x0639;</div>
    </body>
</html>
